package com.linewell.license.demo.designPattern.createPattern.FactotyPattern.cycle;

import com.linewell.license.demo.designPattern.createPattern.FactotyPattern.AbstractFactory;
import com.linewell.license.demo.designPattern.createPattern.FactotyPattern.car.Car;

/**
 * @Title: springBootDemo
 * @description:
 * @author: hyuhuang@linewell.com
 * @since:2019/11/22
 */
public class CycleFactory extends AbstractFactory {
    public Cycle getCycle(String name){
        if ("moto".equalsIgnoreCase(name)){
            return new MotoCycle();
        } else if ("elec".equalsIgnoreCase(name)){
            return new ElecCycle();
        }
        return new Cycle();
    }

    @Override
    public Car getCar(String name) {
        return null;
    }
}
